<?php
$option_data = array();
foreach ($category_options as $option) {
    $option_data[$option['id']] = $option['name'];
}
?>
<?php echo isset($errors) ? $errors : ''; ?>
<?php echo form_open_multipart(base_url().'admin/tickets/edit/'.$ticket->id); ?>
<dl>
    <dt><?php echo __('category'); ?><span style="color: red">*</span>:  </dt>
    <dd>
        <?php echo form_dropdown('cat_id', $option_data, $ticket->cat_id, 'id="cat_id"'); ?>
    </dd>
    <dt><?php echo __('name_of_ticket'); ?><span style="color: red">*</span>: </dt>
    <dd>
        <?php echo form_input(array('name' => 'ticket_name', 'value' => $ticket->ticket_name, 'max-length' => 300)); ?>
    </dd>

    <dt><?php echo __('price'); ?><span style="color: red">*</span>: </dt>
    <dd>
        <?php echo form_input(array('name' => 'price', 'value' => $ticket->price, 'max-length' => 300)); ?>
    </dd>

    <dt><?php echo __('quantity'); ?>: </dt>
    <dd>
        <?php echo form_input(array('name' => 'quantity', 'value' => $ticket->quantity, 'max-length' => 300)); ?>
    </dd>

    <dt><?php echo __('expiry'); ?>: </dt>
    <dd>
        <?php echo form_input(array('name' => 'expiry_date', 'id' => 'expiry_date', 'value' => $ticket->expiry_date, 'max-length' => 300)); ?>
    </dd>
    <dt></dt>
    <dd>
        <img src="<?php echo base_url(); ?>uploads/images/ticket/thumbnail/<?php echo $ticket->img_name; ?>" />
    </dd><br/>
    <dt><?php echo __('admin_edit_change_image')?>: </dt>
    <dd>
        <input type="file" name="userfile" size="35" accept="image/*" class="image_chooser"/>
    </dd>
    <dt><?php echo __('description'); ?>: </dt>
    <dd>
        <?php echo form_textarea(array('name' => 'description', 'value' => $ticket->description, 'max-length' => 300)); ?>
    </dd>
    
    <dt><?php echo __('tags'); ?>: </dt>
    <dd>
        <?php echo form_input(array('name' => 'tag', 'id' => 'tag', 'value' => $ticket->tag, 'max-length' => 100)); ?>
    </dd>    
    <dt><?php echo __('admin_aboutus_meta_title'); ?>: </dt>
    <dd>
        <?php //echo form_textarea(array('name' => 'meta_title', 'value' => isset($_POST['meta_title']) ? $_POST['meta_title'] : $ticket->meta_title, 'max-length' => 200)); ?>
        <?php echo form_input(array('name' => 'meta_title', 'id' => 'meta_title', 'value' => $ticket->meta_title, 'max-length' => 200)); ?>
    </dd>    
    <dt><?php echo __('admin_aboutus_meta_description'); ?>: </dt>
    <dd>
        <?php echo form_textarea(array('name' => 'meta_description', 'value' => isset($_POST['meta_description']) ? $_POST['meta_description'] : $ticket->meta_description, 'max-length' => 300)); ?>
    </dd>
    <dt><?php echo __('admin_aboutus_meta_keyword'); ?>: </dt>
    <dd>
        <?php echo form_textarea(array('name' => 'meta_keyword', 'value' => isset($_POST['meta_keyword']) ? $_POST['meta_keyword'] : $ticket->meta_keyword, 'max-length' => 300)); ?>
    </dd>
</dl>

<?php
echo form_submit('btnEdit', 'Save changes');
echo '&nbsp;';
?>
<?php echo form_close(); ?>
